-module('ex_6.12_separation_spaces').

-include_lib("eunit/include/eunit.hrl").

-define(FILENAME, "test/parsing/" ?MODULE_STRING ".yaml").

single_test_() ->
    ?_assertMatch(
      {yamerl_parser,
        {file,?FILENAME},
        [],
        <<>>,
        97,
        true,
        [],
        0,
        98,
        7,
        1,
        false,
        6,
        9,
        utf8,
        false,
        undefined,
        _,
        _,
        [],
        {bcoll,root,0,-1,1,1,-1,1,1},
        false,
        false,
        false,
        [{impl_key,false,false,undefined,undefined,1,1}],
        false,
        false,
        _,
        [],
        0,
        29,
        28,
        undefined,
        undefined,
        _,
        false,
        [],
        [
          {yamerl_stream_end,6,9},
          {yamerl_doc_end,6,9},
          {yamerl_collection_end,6,9,block,mapping},
          {yamerl_collection_end,6,9,block,mapping},
          {yamerl_scalar,6,4,
            {yamerl_tag,6,4,{non_specific,"?"}},
            flow,plain,"0.278"},
          {yamerl_mapping_value,5,6},
          {yamerl_scalar,5,3,
            {yamerl_tag,5,3,{non_specific,"?"}},
            flow,plain,"avg"},
          {yamerl_mapping_key,5,3},
          {yamerl_scalar,4,6,
            {yamerl_tag,4,6,{non_specific,"?"}},
            flow,plain,"65"},
          {yamerl_mapping_value,3,5},
          {yamerl_scalar,3,3,
            {yamerl_tag,3,3,{non_specific,"?"}},
            flow,plain,"hr"},
          {yamerl_mapping_key,3,3},
          {yamerl_collection_start,3,3,
            {yamerl_tag,3,3,{non_specific,"?"}},
            block,mapping},
          {yamerl_mapping_value,1,29},
          {yamerl_collection_end,1,28,flow,mapping},
          {yamerl_scalar,1,23,
            {yamerl_tag,1,23,{non_specific,"?"}},
            flow,plain,"Sosa"},
          {yamerl_mapping_value,1,21},
          {yamerl_scalar,1,17,
            {yamerl_tag,1,17,{non_specific,"?"}},
            flow,plain,"last"},
          {yamerl_mapping_key,1,17},
          {yamerl_scalar,1,10,
            {yamerl_tag,1,10,{non_specific,"?"}},
            flow,plain,"Sammy"},
          {yamerl_mapping_value,1,8},
          {yamerl_scalar,1,3,
            {yamerl_tag,1,3,{non_specific,"?"}},
            flow,plain,"first"},
          {yamerl_mapping_key,1,3},
          {yamerl_collection_start,1,1,
            {yamerl_tag,1,1,{non_specific,"?"}},
            flow,mapping},
          {yamerl_mapping_key,1,1},
          {yamerl_collection_start,1,1,
            {yamerl_tag,1,1,{non_specific,"?"}},
            block,mapping},
          {yamerl_doc_start,1,1,{1,2},_},
          {yamerl_stream_start,1,1,utf8}
        ]
      },
      yamerl_parser:file(?FILENAME)
    ).
